package cn.itsource.service.impl;

import cn.itsource.service.IFileService;
import cn.itsource.util.UpdateUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author : 张金铭
 * @description :
 * @create :2022-11-01 15:24:00
 */
@Service
public class FileServiceImpl implements IFileService {


    @Override
    public String uploadFile(MultipartFile file) {
        String url = UpdateUtils.fileUpload(file);
        return url;
    }

    @Override
    public boolean deleteFile(String fileName) {

        return UpdateUtils.fileDelete(fileName);
    }
}
